<?php

namespace app\mini\controller\v1\client\validate;


use think\Validate;

class UsedCarValidate extends Validate
{
    protected $rule = [
        'car_age'      => 'require',
        'mileage'      => 'require',
        'price'      => 'require',
        'detail'      => 'require',
        'cover_img'      => 'require',
        'address'      => 'require',
        'car_type'      => 'require',
        'level'      => 'require',
        'insurance_expires'      => 'require',
        'longitude'      => 'require',
        'latitude'      => 'require',
    ];

    protected $message = [
        'car_age.require'      => '上牌时间必填',
        'mileage.require'      => '里程必填',
        'price.require'      => '出售价必填',
        'detail.require'      => '详情必填',
        'cover_img.require'      => '封面图必填',
        'address.require'      => '详细地址必填',
        'car_type.require'      => '能源类型必填',
        'level.require'      => '级别必填',
        'insurance_expires.require'      => '保险到期必填',
        'longitude.require'      => '经度必填',
        'latitude.require'      => '纬度必填',
    ];

    protected $scene = [
        'edit'  => ['car_age','mileage','price','detail','cover_img','address','car_type','level','insurance_expires','longitude','latitude'],
    ];
}